package com.hospital.hospitalsystem.modules.user.service;


import com.hospital.hospitalsystem.modules.user.dao.entity.OrderEntity;
import com.hospital.hospitalsystem.modules.user.dao.mapper.OrderMapper;
import com.hospital.hospitalsystem.modules.user.dto.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author qiancheng@cqxyy.net
 * @date 2023/4/19
 */
@Component
public class OrderService {

    @Autowired
    private OrderMapper orderMapper;

    public void insertSelective(OrderEntity orderEntity) {
        orderMapper.insertSelective(orderEntity);
    }

    public List<SearchOrderRsp> medicalList(SearchOrderListReq req) {
        return orderMapper.medicalList(req);
    }

    public void deleteByExample(Example example) {
        orderMapper.deleteByExample(example);
    }

    public void updateByExampleSelective(OrderEntity orderEntity,Example example) {
        orderMapper.updateByExampleSelective(orderEntity,example);
    }

    public List<BeforePlaceOrderRsp> beforePlaceOrder(BeforePlaceOrderReq req) {
        return orderMapper.beforePlaceOrder(req);
    }

    public List<OrderEntity> selectByExample(Example example) {
        return orderMapper.selectByExample(example);
    };
}
